package com.bluefish.bltuan.action;

import java.util.List;

import org.apache.struts2.rest.DefaultHttpHeaders;
import org.apache.struts2.rest.HttpHeaders;

import com.bluefish.bltuan.module.cms.Content;
import com.bluefish.bltuan.service.ContentService;

public class FaqAction extends OpenAction{

	/**
	 * 
	 */
	private static final long serialVersionUID = 2640955224120043608L;

	private List<Content> faqs;
	
	private ContentService contentService;
	
	@Override
	public HttpHeaders index() {
		this.faqs = this.contentService.listQuestions();
		return new DefaultHttpHeaders(INDEX).disableCaching();
	}
	
	public void setContentService(ContentService contentService) {
		this.contentService = contentService;
	}
	
	public List<Content> getFaqs() {
		return faqs;
	}
}
